﻿#ifndef HALCONCIRCLEFINDWIDGET_H
#define HALCONCIRCLEFINDWIDGET_H

#include <QWidget>
#include <QSpinbox>
#include <QDoubleSpinbox>
#include <QLineEdit>
#include <QPushButton>
#include <QTabWidget>
#include <QCheckBox>
#include "WidgetRoiDraw.h"
#include "QtHalcon.h"


class HalconCircleFindWidget : public QWidget
{
    Q_OBJECT
public:
    explicit HalconCircleFindWidget(QWidget *parent = nullptr);
    void setImage(const QImage& img);
    CircleFindParam getParam();
    void setParam(const CircleFindParam& par);
signals:

private:
    void setupUI();
    void initUI();
    void initConnection();
    void updateCircleFindPar();

private:
    //CircleFind
    WidgetRoiDraw* wgtRoiCircleFind;
    QSpinBox* spboxPointNum;
    QSpinBox* spboxPointFindWidth;
    QComboBox* cbboxCirclePolarity;
    QComboBox* cbboxCircleSelect;
    QDoubleSpinBox* dspboxMinScore;
    QDoubleSpinBox* dspboxMeasureThr;
    QDoubleSpinBox* dspboxMeasureSigma;
    QPushButton* pbtnCircleFind;
    //var
    QImage mImg;
    CircleFindParam mParam;
};

#endif // HALCONCIRCLEFINDWIDGET_H
